import Component from "../Component.js";
import Type from "../../experience/db/Type.js";

export default class Kriging extends Component {
    constructor() {
        super();
    }

    template() {}

    control() {
        const kriging = {
            polygons: [[
                [37438754.31249903,4317621.6060535265],
                [37439590.19736324,4317923.121665262],
                [37439559.794104904,4317227.218885742],
                [37438709.53295273,4316797.662401658],
                [37438372.19370396,4317520.105748586],
                [37438754.31249903,4317621.6060535265]
            ]],
            values: [23, 54, 11, 34, 32, 67],
            lngs: [37438593, 37438771, 37439259, 37439227, 37438946, 37438832],
            lats: [4317436, 4317018, 4317270, 4317589, 4317331, 4317251],
            width: 0
        }

        const box = this.algo.box(kriging.polygons[0]);
        kriging.width = box.right - box.left;
        this.utils.setLocalStorage('kriging', kriging);
        this.drawer.draw(Type.Inter);
    }
}